package com.ruoyi.users.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.users.mapper.AddMyfavoriteMapper;
import com.ruoyi.users.domain.AddMyfavorite;
import com.ruoyi.users.service.IAddMyfavoriteService;

/**
 * 收藏Service业务层处理
 * 
 * @author zbz
 * @date 2024-05-19
 */
@Service
public class AddMyfavoriteServiceImpl implements IAddMyfavoriteService 
{
    @Autowired
    private AddMyfavoriteMapper addMyfavoriteMapper;

    /**
     * 查询收藏
     * 
     * @param id 收藏主键
     * @return 收藏
     */
    @Override
    public AddMyfavorite selectAddMyfavoriteById(Long id)
    {
        return addMyfavoriteMapper.selectAddMyfavoriteById(id);
    }

    /**
     * 查询收藏列表
     * 
     * @param addMyfavorite 收藏
     * @return 收藏
     */
    @Override
    public List<AddMyfavorite> selectAddMyfavoriteList(AddMyfavorite addMyfavorite)
    {
        return addMyfavoriteMapper.selectAddMyfavoriteList(addMyfavorite);
    }

    /**
     * 新增收藏
     * 
     * @param addMyfavorite 收藏
     * @return 结果
     */
    @Override
    public int insertAddMyfavorite(AddMyfavorite addMyfavorite)
    {
        return addMyfavoriteMapper.insertAddMyfavorite(addMyfavorite);
    }

    /**
     * 修改收藏
     * 
     * @param addMyfavorite 收藏
     * @return 结果
     */
    @Override
    public int updateAddMyfavorite(AddMyfavorite addMyfavorite)
    {
        return addMyfavoriteMapper.updateAddMyfavorite(addMyfavorite);
    }

    /**
     * 批量删除收藏
     * 
     * @param ids 需要删除的收藏主键
     * @return 结果
     */
    @Override
    public int deleteAddMyfavoriteByIds(Long[] ids)
    {
        return addMyfavoriteMapper.deleteAddMyfavoriteByIds(ids);
    }

    /**
     * 删除收藏信息
     * 
     * @param id 收藏主键
     * @return 结果
     */
    @Override
    public int deleteAddMyfavoriteById(Long id)
    {
        return addMyfavoriteMapper.deleteAddMyfavoriteById(id);
    }
}
